<template>
  <div class="visits-count">
    <div class="visits-count-box">
      <h3 class="visits-count-box-title" v-html="title"></h3>
      <div class="visits-count-box-number">
        <span v-for="item in String(num)">{{ item }}</span>
      </div>
    </div>
  </div>
</template>
<script setup>
defineProps({
  title: {
    required: true,
    type: String,
    default: '',
  },
  num: {
    required: true,
    type: [String, Number],
    default: '',
  },
})
</script>
<style scoped lang="scss">
.visits-count {
  margin-bottom: 20px;
  width: 187px;
  height: 80px;
  background: url('@/assets/images/anbao/bg_num.png') no-repeat center;
  background-size: 100% 100%;
  position: relative;

  &-box {
    background: #010C4E;
    position: absolute;
    top: 5px;
    left: 5px;
    right: 10px;
    bottom: 5px;
    overflow: hidden;

    &-title {
      font-size: 14px;
      color: #46FFFF;
      margin: 0;
      margin: 10px 0;
      padding-left: 10px;
    }

    &-number {
      height: 30px;
      line-height: 35px;
      font-size: 30px;
      color: #46FFFF;
      margin: 0 auto;
      text-align: center;
      width: 100%;

      &>span {
        background: #004c86;
        padding: 0 4px;
        margin-right: 5px;

        &:last-child {
          margin-right: 0;
        }
      }
    }
  }
}
</style>